<!--This file is a test file for your convenience.
    It makes a request to the variable query_url and displays the base64 encoded image result. -->

<!DOCTYPE html>
<html lang="en">
<body>
<p>This html file makes the following query to your code: <tt>{lrlon=-122.2104604264636, ullon=-122.30410170759153, w=1091.0, h=566.0, ullat=37.870213571328854, lrlat=37.8318576119893}
</tt>

<p>The expected result from getMapRaster is:
<tt>{raster_ul_lon=-122.2998046875, depth=2, raster_lr_lon=-122.2119140625, raster_lr_lat=37.82280243352756, render_grid=[[d2_x0_y1.png, d2_x1_y1.png, d2_x2_y1.png, d2_x3_y1.png], [d2_x0_y2.png, d2_x1_y2.png, d2_x2_y2.png, d2_x3_y2.png], [d2_x0_y3.png, d2_x1_y3.png, d2_x2_y3.png, d2_x3_y3.png]], raster_ul_lat=37.87484726881516, query_success=true}
</tt>

<p>The image output of your program is shown below (will be blank if your server isn't running or working properly):

<p><meta charset="UTF-8">
    <img id="map">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
    <script>
        var query_url = "http://localhost:4567/raster";
        $.get({
            async: false,
            url: query_url,
            data: { h: 566.0,
                    lrlat: 37.8318576119893,
                    lrlon: -122.2104604264636,
                    ullat: 37.870213571328854,
                    ullon: -122.30410170759153,
                    w: 1085.0
                   },
            success: function(data) {
                map.src = "data:image/png;base64," + data.b64_encoded_image_data;
            },
            dataType: "json"
        });
    </script>

<p>The correct output should be:
<p><img src="http://datastructur.es/sp17/materials/proj/proj3/testTwelveImages.png">

<p>If your image looks different (or is blank), your implementation is not correct.    
</body>
</html>